
LIBS=../../dk-server/libdk_base_server.a
CXXFLAGS=-DDEBUG -g -I../../dk-server
LDFLAGS=-levent -levent_pthreads

OBJS=server.o logger.o base_conf.o ds_conf.o storage.o conn.o task.o
TARGET=data_server

$(TARGET):$(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LDFLAGS)

SRCS=server.cpp logger.cpp base_conf.cpp ds_conf.cpp storage.cpp conn.cpp task.cpp
DEPS=.depend

$(DEPS):$(SRCS)
	makedepend -f- -I./ -Y $(SRCS) 2> /dev/null > $(DEPS)

include $(DEPS)

.PHONY:clean
clean:
	rm $(TARGET) $(OBJS)

.PHONY:distclean
distclean:
	$(MAKE) clean
	rm $(DEPS)
